package com.api.syh56.shengyunhui.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gitee.sunchenbin.mybatis.actable.annotation.*;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Builder;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 货物
 */
@Data
@TableName("goods")
public class Goods {

    @Column(name = "id",isKey = true,isAutoIncrement = true,comment = "地址id")
    private Long id;

    @Column(name = "goods_name") // 货物名称
    private String goodsName;

    @Column(name = "goods_package_method") // 包装方式
    private String goodsPackageMethod;

    @Column(name = "goods_num") // 数量
    @ColumnComment("货物数量")
    @DefaultValue("0")
//    private double goodsNum;
    private BigDecimal goodsNum;

    @Column(name = "goods_weight") // 重量
    @DefaultValue("0")
//    private double goodsWeight;
    private BigDecimal goodsWeight;

    @Column(name = "goods_size") // 体积
    @ColumnComment("货物体积")
    @DefaultValue("0")
//    private double goodsSize;
    private BigDecimal goodsSize;


    @Column(name = "is_abnormal")
    @DefaultValue("0")
    private Boolean isAbnormal;

    @Column(name = "length")
    @DefaultValue("0")
//    private double length;
    private BigDecimal length;

    @Column(name = "width")
    @DefaultValue("0")
//    private double width;
    private BigDecimal width;

    @Column(name = "height")
    @DefaultValue("0")
//    private double height;
    private BigDecimal height;

    @Column(name = "goods_pic_url",type = MySqlTypeConstant.TEXT)
    @ColumnComment("货物图片地址")
    private String goodsPicUrl;

    @Column(name = "car_use_method") // 用车方式
    @ColumnComment("用车方式 0零担 1整车")
    @DefaultValue("1")
    private short carUseMethod;

    @Column(name = "expected_load_time") // 期望装货时间
    @ColumnComment("期望装货时间")
    private String expectedLoadTime;

    @Column(name = "demand_length") // 要求车辆长度
    @ColumnComment("要求车辆长度")
    @DefaultValue("0")
    private String demandLength;

    @Column(name = "demand_car_type") // 要求车型
    @ColumnComment("要求车型")
    private String demandCarType;

    @Column(name = "demand_load") // 要求车辆载重
    @ColumnComment("要求车辆载重")
    private String demandLoad;

    @TableField(fill = FieldFill.INSERT)
    @Column(name = "creator_user_id")
    private Long creatorUserId;

    @Column(name = "creation_time")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime creationTime;

    @Column(name = "last_modifier_user_id") // 最后修改者用户ID
    private Long lastModifierUserId;

    @Column(name = "last_modification_time") // 最后修改时间
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime lastModificationTime;

    @TableLogic
    @Column(name = "is_deleted")
    @DefaultValue("false")
    private Boolean isDeleted;

}